<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>活动列表</title>
</head>
<body>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 
	<span class="c-gray en">&gt;</span> 活动管理 
	<span class="c-gray en">&gt;</span> 活动列表 
	<a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	<!-- <span class="r" style="margin-top: -2px; box-sizing: border-box;">
		<select name="is_open" class="select" style="width: auto; height: 31px; vertical-align: middle;">
			<option value="">=状态=</option>
			<option value="0">关闭</option>
			<option value="1">显示</option>
		</select>
		<select name="cid" class="select" style="width: auto; height: 31px; vertical-align: middle;">
			<option value="">=文章分类=</option>
			<option value='1'>首页头条</option>
			<option value='2'>券体验指南</option>
			<option value='3'>今日之星</option>
			<option value='4'>微商秘籍</option>
		</select>
		

		<span style="position:relative">
			<input type="text" name="k"  placeholder=" 活动名称" style="width:200px" class="input-text">
			<i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
		</span>

		<button id="search" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
	</span> -->
</nav>

<div class="pd-15">
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c sort0">
					<th width="25" class="valueid"><input type="checkbox" name="" value=""></th>
					<th width="50" class="fun-sort2" data-name="activity_id" data-flag="0">ID</th>
					<th>标题</th>

					<!-- <th width="80">分类</th>
					<th width="120" class="fun-sort2" data-name="article_time" data-flag="0">发布时间</th>

					<th width="75" class="fun-sort2" data-name="article_click" data-flag="0">浏览次数</th> -->

					<th width="60">活动状态</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody id="content_sp">
				
			</tbody>
		</table>
	</div>

	

	<div class="cl pd-5 bg-1 bk-gray mt-20 mb-20"> 
		<!-- <a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a>  -->
		<!-- <a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>  -->
		<a class="btn btn-primary radius mt-5 l mr-10" data-title="添加活动" _href="activity-add.html" onclick="_open('添加','activity-add.html','90%','90%',true)" href="javascript:;">
			<i class="Hui-iconfont">&#xe600;</i> 添加
		</a>
		
		<span class="r pt-5"  style="line-height: 35px;" id="page"></span>
		<span class="r mr-10"  style="line-height: 40px;" id="dataall"></span>  
	</div>



</div>
<!-- 模版 -->

<script id="test" type="text/html">
<% for (x in list) { %>
<tr class="text-c sort1">
	<td class="valueid"><input type="checkbox" value="<%=list[x].activity_id%>" name="" ></td>
	<td><%=list[x].activity_id%></td>
	<td class="text-l text-overflow"><%=list[x].activity_name%></td>
	
	<!-- <td><a href="<%=list[x].article_url%>" target="_blank"><%=list[x].article_url%></a></td> -->
	<td class="td-status">
		<input type="checkbox" class="switch fun-start-stop" style="outline: none;" <%if(list[x].is_open==1){ %>checked<% } %>/>
	</td>
	<td class="f-18 td-manage">
		<a style="text-decoration:none" class="ml-5" onClick="_open('活动编辑','activity-add.html?editid=<%=list[x].activity_id%>','90%','90%',true)" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
		<a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i>
		</a>
	</td>
</tr>
<%}%>
</script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 


<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script src="/Manage/js/lazyload.min.js"></script>

<script type="text/javascript" src="lib/daterangepicker/moment.min.js"></script> 
<script type="text/javascript" src="lib/daterangepicker/jquery.daterangepicker.js"></script>
<link rel="stylesheet" href="lib/daterangepicker/daterangepicker.css" /> 
<script src="/Manage/js/lazyload.min.js"></script>
<script type="text/javascript">
var API=API_ACTIVITY;
var kk=API_ACTIVITY;
var orderby='';
var search='';

loaddata(API,1);

	// $('#date-range1').dateRangePicker({
	// 	startOfWeek: 'monday',
	// 	separator : ' 至 ',
	// 	format: 'YYYY-MM-DD HH:mm',
	// 	autoClose: true,
	// 	time: {
	// 		enabled: true
	// 	},
	// 	defaultTime: moment().startOf('day').toDate(),
	// 	defaultEndTime: moment().endOf('day').toDate()
	// });



$.ajaxSetup({
    //同步处理
    async: false
});



$(document).on('click','#search',function(){
	kk=API+"?";

	var param=[
		'k='+encodeURI(document.querySelector('input[name=k]').value),
		'state='+document.querySelector('select[name=is_open]').value,
		'cid='+document.querySelector('select[name=cid]').value,

		
		// 'time='+document.querySelector('input[name=time]').value,
	];
	search=param.join('&');
    kk=kk+search+'&'+orderby;

	loaddata(kk,1);
})
</script> 
</body>
</html>